Component({
  options: {
    multipleSlots: true // 在组件定义时的选项中启用多slot支持
  },
  properties: {
    title: {
      type: String,
      value: '弹窗标题'
    },
    content: {
      type: String,
      value: '弹窗内容'
    },
    cancelText: {
      type: String,
      value: '取消'
    },
    deleteAll: {
      type: String,
      value: '删除全部'
    },
    okText: {
      type: String,
      value: '确定'
    }
  },
  data: {
    isShow: false
  },
  methods: {
    setContent:function(){
      this.setData({
        title: '温馨提示',
        content: '你要删除此选项吗',
        cancelText: '否',
        deleteAll: '删除全部',
        okText: '是'
      })
    },
    show: function () {
      this.setData({
        isShow: true
      })
    },
    close: function () {
      this.setData({
        isShow: false
      })
    },
    _cancelEvent: function () {
      this.triggerEvent('cancelEvent');
    },
    _deleteAll: function () {
      this.triggerEvent('deleteAll');
    },
    _okEvent: function () {
      this.triggerEvent('okEvent');
    }
  }
})